package DemoPackage;

import org.apache.tools.ant.BuildEvent;
import org.apache.tools.ant.BuildListener;

// 监听Task build events
public class DemoListener implements BuildListener {


    @Override
    public void buildStarted(BuildEvent buildEvent) {
        System.out.println("DemoListener: buildStarted " + buildEvent.toString());
    }

    @Override
    public void buildFinished(BuildEvent buildEvent) {
        System.out.println("DemoListener: buildFinished " + buildEvent.toString());
    }

    @Override
    public void targetStarted(BuildEvent buildEvent) {
        System.out.println("DemoListener: targetStarted " + buildEvent.toString());
    }

    @Override
    public void targetFinished(BuildEvent buildEvent) {
        System.out.println("DemoListener: targetFinished " + buildEvent.toString());
    }

    @Override
    public void taskStarted(BuildEvent buildEvent) {
        System.out.println("DemoListener: taskStarted " + buildEvent.toString());
    }

    @Override
    public void taskFinished(BuildEvent buildEvent) {
        System.out.println("DemoListener: taskFinished " + buildEvent.toString());
    }

    @Override
    public void messageLogged(BuildEvent buildEvent) {
        System.out.println("DemoListener: messageLogged " + buildEvent.toString());
    }
}
